<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<jsp:include page="../common/bootstrap.jsp"></jsp:include>
<script src="${pageContext.request.contextPath }/resources/js/sys/roleList.js"></script>
<title>角色列表</title>
</head>
<body>
	<jsp:include page="../common/header.jsp">
		<jsp:param name="module" value="admin" />
		<jsp:param name="title" value="角色列表" />
	</jsp:include>
	<div class="main">
		<table id="roleTable"></table>
	</div>
	<div id="toolbar">
		<div class="btn btn-primary" onClick="add()">新增角色</div>
    	<div class="btn btn-primary" onClick="del()">删除</div>
    	<div class="btn btn-primary" onClick="allotPower()">分配权限</div>
    	<div class="btn btn-primary" onClick="ownPowers()">查看权限</div>
   	</div>
   <div class="modal fade" id="roleModal" tabindex="-1" role="dialog" aria-labelledby="roleModalLabel">
		<div class="modal-dialog" role="document">
    		<div class="modal-content">
      			<div class="modal-header">
        			<button type="button" class="close" data-dismiss="modal" aria-label="Close">
        				<span aria-hidden="true">&times;</span>
        			</button>
        			<h4 class="modal-title" id="roleModalLabel">角色对话框</h4>
      			</div>
      			<div class="modal-body">
        			<form id="roleForm">
        				<input type="hidden" id="powerId">
          				<div class="form-group">
            				<label for="roleName" class="control-label">角色名称:</label>
            				<input id="roleName" name="roleName" type="text" class="form-control">
          				</div>
        			</form>
      			</div>
      			<div class="modal-footer">
        			<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        			<button id="addSave" type="submit" class="btn btn-primary" onClick="save(true)">保存</button>
     				<button id="editSave" type="submit" class="btn btn-primary" onClick="save(false)">保存</button>
     			</div>
    		</div>
  		</div>
	</div>
	<jsp:include page="../common/footer.jsp"></jsp:include>
</body>
</html>
